var statisticalData={
    init:function(){
        var self=this;
        self.shadeDiv = $("#shade-div");
        self.bindEvents();

    },
    bindEvents:function(){
        var self=this;


    },
    ajaxGET:function (url, data, fn,beforeSendFn) {
        var beforeSendFn = beforeSendFn || function(){};
        $.ajax({type:"GET", dataType:'json', context:this, url:url, data:data, success:fn, beforeSend:beforeSendFn});
    },
    ajaxPOST:function (url, data, fn,beforeSendFn) {
        var beforeSendFn = beforeSendFn || function(){};
        $.ajax({type:"POST", dataType:'json', context:this, url:url, data:data, success:fn, beforeSend:beforeSendFn});
    },
    pcChange:function(version){
    	statisticalData.ajaxPOST(ctx+"/statistical/client_info!countByVersion.xhtml?netid="+version+"&clientType=0",'',function(data){
    		$("#spanPc").html(data.count);
    	});
    },androidChange:function(version){
    	statisticalData.ajaxPOST(ctx+"/statistical/client_info!countByVersion.xhtml?netid="+version+"&clientType=1",'',function(data){
    		$("#spanAndroid").html(data.count);
    	});
    },iosChange:function(version){
    	statisticalData.ajaxPOST(ctx+"/statistical/client_info!countByVersion.xhtml?netid="+version+"&clientType=2",'',function(data){
    		$("#spanIos").html(data.count);
    	});
    },macChange:function(version){
    	statisticalData.ajaxPOST(ctx+"/statistical/client_info!countByVersion.xhtml?netid="+version+"&clientType=3",'',function(data){
    		$("#spanMac").html(data.count);
    	});
    },otherChange:function(version){
    	statisticalData.ajaxPOST(ctx+"/statistical/client_info!countByVersion.xhtml?netid="+version+"&clientType=4",'',function(data){
    		$("#spanOther").html(data.count);
    	});
    }
    
    

}
$(function(){
    statisticalData.init()
})